import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';

class UserInfoController extends GetxController {
  //TODO: Implement UserInfoController

  final count = 0.obs;
  final name = ''.obs;

  String nameStr = '';
  @override
  void onInit() {
    super.onInit();
  }

  @override
  void onReady() {
    super.onReady();
  }

  save() {
    if (nameStr.isEmpty) {
      EasyLoading.showToast('昵称不能为空');
      return;
    }
    EasyLoading.show();
    Future.delayed(Duration(seconds: 2), () {
      EasyLoading.dismiss();
      EasyLoading.showToast('提交成功，审核通过即可修改');
    });
  }

  @override
  void onClose() {}
  void increment() => count.value++;
}
